package com.example.final_project.Usr.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.example.final_project.MainView;
import com.example.final_project.R;

public class AuthorActivity extends AppCompatActivity {

    private Context context;
    private ImageView back;
    private RelativeLayout artical;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_author);

        findById();

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AuthorActivity.this, MainView.class);
                intent.setAction("backToUserFrag");
                startActivity(intent);
            }
        });

        artical.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(AuthorActivity.this,WorkActivity.class);
                startActivity(intent);
            }
        });

    }

    public void findById(){
        context = getBaseContext();
        back = this.findViewById(R.id.author_back);
        artical = this.findViewById(R.id.author_artical);
    }

}